//
//  SelfSizeTool.m
//  UI10-CellSelfSize
//
//  Created by dllo on 16/7/27.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "SelfSizeTool.h"

@implementation SelfSizeTool
+ (CGFloat)selfSizeWidthWithString:(NSString *)string height:(CGFloat)height font:(UIFont *)font {
    CGRect newRect = [string boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, height) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName: font} context:nil];
    return newRect.size.width;
}
@end
